package com.nian.app.service;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.nian.common.config.ObjectMapperConfig;
import feign.Feign;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Scope;

/**
 * 用途：
 * 开发：zhangmj
 * 日期：2020/4/2 0002 11:16
 */
@EnableHystrix
@EnableCircuitBreaker
@EnableDiscoveryClient
@EnableFeignClients(basePackages = {"com.nian.images.api"})
@MapperScan({"com.nian.app.dao"})
@SpringBootApplication(scanBasePackages = {"com.nian.app.service", "com.nian.images.api"})
public class NianAppServiceApplication {
    public static void main(String[] args) {
        SpringApplication.run(NianAppServiceApplication.class, args);
    }

    @Bean
    public ObjectMapper objectMapper(){
        return new ObjectMapperConfig().objectMapper();
    }

}
